from lib.w.widget.base import Base

class TextView(Base):

	def __init__(self, w):
		self.w = w
		self.b = self.w.get_buffer()

	def set_value(self, value=""):

		self.b.set_text(value)

	def get_value(self):

		return self.b.get_text(self.b.get_start_iter(), self.b.get_end_iter())

	def clear(self):

		self.set_value()

	def __getattr__(self, attr):
		return getattr(self.w, attr)
